// component/sku_page.js
var app = getApp()
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    myId: {
      type: String,
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    answerArr: [],
  },

  /**
   * 组件的方法列表
   */
  methods: {
    setListData: function () {
      let _this = this;
      this.setData({
        answerArr: app.globalData.answer
      });
      app.globalData.answer = [];
    },
    answerDetail: function (e) {
      // console.log(e)
      var myEventDetail = {
        id: e.detail.id,
        title: e.detail.title
      } // detail对象，提供给事件监听函数
      this.triggerEvent('answerDetail', myEventDetail)
    }
  },
  ready: function () {
    this.setListData();
  }
})
